package com.durian.base.update.entity

import java.io.File

internal fun File.safeDelete(){
    if (exists()) delete()
}

class DownloadEntity(
    val apkFile: File,
    val versionEntity: VersionEntity
) {
    val apkFileTemp = File(apkFile.parent, "${apkFile.name}.temp")
    fun downloadSuccess(){
        apkFileTemp.renameTo(apkFile)
    }
}